<?php
/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2017/8/19
 * Time: 10:56
 */

namespace app\admin\validate;

use think\Validate;

class Content extends Validate
{
    protected $rule = [
        'title' => 'require|max:30',
        '__token__' => 'require|token',
        'content' => 'require',
        'category' => 'require|number'
    ];

    protected $message = [
        'title.require' => '标题为必选项',
        'title.max' => '标题长度最大为30',
        'content' => '内容为必选项',
        'category.require' => '栏目为必选项',
        'category.number' => '栏目必须为数字类型'
    ];
}